//
//  StockInquiryHeadView.m
//  ProjectforHDX
//
//  Created by Jaesun on 16/8/3.
//  Copyright © 2016年 H.DX. All rights reserved.
//

#import "StockInquiryHeadView.h"

@implementation StockInquiryHeadView

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self s_setupViews];
    }
    return  self;
}
- (void)s_setupViews {
    
    self.backgroundColor = [UIColor whiteColor];
    
    self.titleLab = [[RZCustomLable alloc] initWithFrame:CGRectMake(10, 0, self.width - 20, 40)];
    self.titleLab.font = CustomFont(14);
    self.titleLab.textColor = [UtilCheck hexStringToColor:@"222222" alpha:1];
    [self addSubview:self.titleLab];
    
    UILabel *line0  = [[UILabel alloc] initWithFrame:CGRectMake(10, self.titleLab.bottom, self.width - 20, 0.5)];
    line0.backgroundColor = [UtilCheck hexStringToColor:@"EDEDED" alpha:1];
    [self addSubview:line0];
    
    NSArray *labelTextArr = @[[UtilCheck language:@"setting.plateConatiner"],[UtilCheck language:@"setting.wbs"],[UtilCheck language:@"setting.plateName"],[UtilCheck language:@"setting.plateNO"],[UtilCheck language:@"order.quantity"]]; // @[@"板件名",@"板件号",@"序列号"];// 
    
    CGFloat xPadding =  SCREEN_WIDTH / 27;
    for (int i = 0;  i < 5; i ++) {
        //        SCREEN_WIDTH / 27  * 2 + i * xPadding * 6 -10
        RZCustomLable *label = [[RZCustomLable alloc] initWithFrame:CGRectMake(10+SCREEN_HEIGHT / 5 *i, line0.bottom + 9.5, 6 * xPadding+10, 30)];
        label.text = labelTextArr[i];
        label.textAlignment = NSTextAlignmentCenter;
        label.layer.cornerRadius = 15;
        label.layer.masksToBounds = YES;
        label.font = CustomFont(13);
        label.backgroundColor = [UtilCheck hexStringToColor:@"E7E7E7" alpha:1];
        label.textColor = [UtilCheck hexStringToColor:@"939393" alpha:1];
        [self addSubview:label];
    }
    
    UILabel *line  = [[UILabel alloc] initWithFrame:CGRectMake(10, line0.bottom + 49.5, self.width - 20, 0.5)];
    line.backgroundColor = [UtilCheck hexStringToColor:@"EDEDED" alpha:1];
    [self addSubview:line];

}


@end
